Includes a subquery into the incremental maintenance mechanism of a view and uniquely identifies it among other subqueries of the same view.

Namespace:  C1.LiveLinq.LiveViews
Assembly:  C1.LiveLinq (in C1.LiveLinq.dll)

Syntax

C#
public View<TResult> AttachView<TResult>(
	Object subqueryId,
	Func<View<T>, View<TResult>> selector
)
Visual Basic
Public Function AttachView(Of TResult) ( _
	subqueryId As Object, _
	selector As Func(Of View(Of T), View(Of TResult)) _
) As View(Of TResult)

Parameters

subqueryId
Type: System..::..Object
A string uniquely specifying this subquery in the view to which it is attached. Can be any string. The only requirement is that different subqueries attached to the same view, if such exist, must have different subquery ids.
selector
Type: System..::..Func<(Of <(<'View<(Of <(<'T>)>)>, View<(Of <(<'TResult>)>)>>)>)>
A function to obtain the attached subview from the view to which it is attached.

Type Parameters

TResult
The type of the elements in the subquery view.

Return Value

The attached subview.

Remarks

This overload must be used if you have several subviews attached to the same view. The subqueryId can be any string as long as it is not repeated for two different subviews attached to the same view.

See the other overload for the explanation of the AttachView method.

See Also